<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript" src="order.js"></script>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>我的订单</title>
<style type="text/css">
#itemsTable input {
	width: 100%;
}
#goodsTable {
	width: 100%;
}
#goodsTable input {
	width: 100%;
}
/* 提示信息鼠标覆盖是信息 */
div.over {
	border: 1px solid #999;
	background: #ffffcc;
	cursor: hand;
}

/* 提示信息鼠标移出是信息 */
div.out {
	border: 1px solid #ffffff;
	background: #ffffff;
}

</style>
</head>
<body>
	<div class="modal fade" id="orderDetails" tabindex="-1" role="dialog"
		aria-labelledby="orderDetailsLabel" aria-hidden="true">
		<div class="modal-dialog" style="width: 90%;">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="myModalLabel">我的订单</h4>
				</div>

				<div class="modal-body">
					<form id="orderInfo" method="post" name="orderInfo">
						<div align="left">
							<div align="center">
								<!--选项卡-->
								<div class="container-fluid">
									<div class="row-fluid">
										<div class="span12">
											<div class="tabbable" id="tabs-234974">
												<ul class="nav nav-tabs">
													<li class="active" id="baseTab"><a href="#baseInfor" data-toggle="tab" id="baseInfors">基本信息</a></li>
													<li id="detailTab"><a href="#detail" data-toggle="tab" class="detailInfor" id="detailInfor">详细信息</a></li>
													<li id="returnTab"><a href="#returnDetail" data-toggle="tab" class="returnGoodsinfor" id="returnGoodsinfor">退货列表</a></li>

												</ul>
												<div class="tab-content">
													<div class="tab-pane active" id="baseInfor">
														<table class="table table-bordered">

															<input style="width: 200px;" type="hidden" id="orderId"
																name="id" value="${order.id}" />
															<tr>
																<td style="text-align: right;">订单编号:</td>
																<td><input style="width: 200px;" type="text"
																	id="orderCode" required name="orderCode"
																	value="${order.orderCode}" /></td>
																<td style="text-align: right;">订单金额:</td>

																<td><input style="width: 200px;" type="text"
																	id="summery" required name="summery"
																	value="${order.summery}" class="order_summery" 
																	class="inputxt Validform_error" datatype="*" 
																	/></td>
															</tr>
															<tr>
																<td style="text-align: right;">邮政编码:</td>
																<td><input style="width: 200px;" type="text"
																	required id="postCode" name="postCode"
																	value="${order.postCode}" class="inputxt Validform_error" 
																	datatype="p" errormsg="邮政编码格式错误" nullmsg="请填写信息！"/>
																	<span class="Validform_checktip">请输入邮政编码</span>
																	</td>
																<td style="text-align: right;">付款方式:</td>
																<td><select name="payType" id="payType">
																	<c:forEach var="type" items="${typeList}">${type.sta_key}
																			<option value="${type.sta_key}"
																				<c:if test="${order.payType}==${type.sta_key}">selected="selected"</c:if>>${type.sta_val}
																			</option>
																	</c:forEach>
																</select></td>
																
															</tr>
															<tr>

																<td style="text-align: right;">收货地址:</td>
																<td colspan="3"><input style="width: 400px;"
																	type="text" required id="receAddr" name="receAddr"
																	value="${order.receAddr}" class="inputxt Validform_error" 
																	datatype="*"  nullmsg="请填写信息！"/>
																	<span class="Validform_checktip">请输入收货地址</span>
																	</td>

															</tr>
															<tr>

																<td style="text-align: right;">会员名:</td>
																<td><input style="width: 200px;" type="text"
																	required id="memberName" name="memberName"
																	value="${order.memberName}"  class="inputxt Validform_error" 
																	datatype="*4-16" errormsg="会员名填写格式错误" nullmsg="请填写信息！" 
																	ajaxurl="<%=request.getContextPath()%>/manage/order/checkMemberName.do"/>
																	<span class="Validform_checktip">请输入会员名</span>
																	</td>
																<td style="text-align: right;">收货人:</td>
																<td><input style="width: 200px;" type="text"
																	required id="receiver" name="receiver"
																	value="${order.receiver}" class="inputxt Validform_error" 
																	datatype="*" nullmsg="请填写信息！"/>
																	<span class="Validform_checktip">请输入收货人</span>
																	</td>

															</tr>

															<tr>
																<td style="text-align: right;">包邮</td>
																<td><select name="ispost" id="ispost">
																		<c:choose>
																			<c:when test="${order.ispost==0}">
																				<option value="0" selected="selected">否</option>
																				<option value="1">是</option>
																			</c:when>
																			<c:otherwise>
																				<option value="0">否</option>
																				<option value="1" selected="selected">是</option>
																			</c:otherwise>
																		</c:choose>
																</select></td>
																
																<td class="buyGift-table-tboder">普通配送
                 													<select id="commentStatus" class="commentStatus" onChange="changePostType(this.value);" style="width:100px;height:30px;">
                   
                													</select>
               													</td>
																<!-- <td style="text-align: right;">邮费:</td> -->
																<td>邮费:<input style="width: 200px;" type="text"
																	required id="mailFeed" name="mailFeed"
																	 datatype="*"/></td>

															</tr>
															<tr>


																<td style="text-align: right;">状态:</td>
																<td><select name="status" id="status"
																	style="width: 200px;">
																		<c:forEach var="orderStatus"
																			items="${orderStatusList}">
																			<option value="${orderStatus.sta_key}"
																				<c:if test="${order.status}==${orderStatus.sta_key}">selected="selected"</c:if>>${orderStatus.sta_val}
																			</option>
																		</c:forEach>

																</select></td>
																<td style="text-align: right;">备注:</td>
																<td colspan="3"><textarea rows="3" cols="50"
																		style="width: 200px;" name="note" id="note">${order.note}</textarea></td>
															</tr>


														</table>
														
													</div>
													<div class="tab-pane" id="detail">
														<div class="tab-content">

															<div id="searchInfor" style="height:30px;">
																礼品名称/代码:<input id="itemName" name="itemName"
																	style="width: 20%;" /><input id="itemId"
																	name="itemId" type="hidden" />
																规格列表：<select id="giftRules" name="ruleItems">
																		<option value="-1">请选择</option>
																		</select>
																<button id="addItem" class="btn btn-sm btn-primary" type="button">添加</button>
																<button id="clearItem" class="btn btn-sm btn-danger">清空列表</button>
																<div id="selectItem"
																	style="display: none; text-align:left; z-index:9999999;left:-85px;top:0px; position: relative; width: 20%"></div>
															</div>
															<div id="itemList"
																style="margin-top: 25px; height: 350px;">
																<table id="itemsTable" class="table table-bordered">
																	<tr>
																		<td style="text-align: center; width: 100px;">礼品编号</td>
																		<td style="text-align: center; width: 100px;">礼品名称</td>
																		<td style="text-align: center; width: 100px;">规格</td>
																		<td style="text-align: center; width: 100px;">单价</td>
																		<td style="text-align: center; width: 100px;">数量</td>
																		<td style="text-align: center; width: 100px;">总价</td>
																		<td style="text-align: center; width: 100px;">备注</td>
																		<td style="text-align: center; width: 100px;">操作</td>
																	</tr>
																</table>
															</div>
														<div style="text-align: center;">
															<ul class="pagination" id="itemPagination"></ul>
														</div>
														
														</div>
													</div>
													<div class="tab-pane" id="returnDetail" style="margin-top: 25px; height: 350px;">
														<div class="tab-content">

															<div id="backGoodsInfor" style="margin-top: 25px;width: 600px">
																条形码:<input id="snCode" name="snCode"
																	style="width: 150px" />
																<button id="searchItem" class="btn btn-sm btn-primary" type="button">搜索</button>
																<button id="clearGoodsItem" class="btn btn-sm btn-danger">清空列表</button>
															</div>
															<div id="itemList"
																style="margin-top: 25px; height: 350px;">
																<table id="goodsTable" class="table table-bordered">
																	<tr>
																		<td style="text-align: center; width: 100px;">礼品编号</td>
																		<td style="text-align: center; width: 100px;">礼品名称</td>
																		<td style="text-align: center; width: 100px;">规格</td>
																		<td style="text-align: center; width: 100px;">条形码</td>
																		<td style="text-align: center; width: 100px;">单价</td>
																		<td style="text-align: center; width: 100px;">备注</td>
																		<td style="text-align: center; width: 100px;">操作</td>
																	</tr>
																</table>
															</div>
														<div style="text-align: center;">
															<ul class="pagination" id="itemPagination2"></ul>
														</div>
														
														</div>
													</div>
													<div id="optBtn" class="modal-footer">
															<button id="saveBtn" type="button" name="saveBtn"
																class="btn btn-primary">保存</button>
															<button id="confirmBtn" name="confirmBtn" type="button"
																class="btn btn-danger">确定发货</button>
															<button id="returnGoodsBtn" name="returnGoodsBtn" type="button"
																class="btn btn-danger">确定退货</button>
															<button id="returnMoneyBtn" name="returnMoneyBtn" type="button"
																class="btn btn-danger">确定退款</button>
															<button type="button" class="btn btn-default"
																data-dismiss="modal" id="closeBtn" name="closeBtn">关闭</button>
														</div>
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>

					</form>
				</div>

			</div>

		</div>

	</div>





</body>
</html>